﻿using Inovout.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inovout.Kuajing.Models
{
    public partial class PurchaseOrderItem : DataObject
    {
        public virtual Commodity Commodity { get; set; }
        public virtual PurchaseOrder PurchaseOrder { get; set; }
        private string commodityCode;
        [JsonProperty("commodity_code")]
        public virtual string CommodityCode
        {
            get { return commodityCode ?? (Commodity == null ? string.Empty : Commodity.Code); }
            set { commodityCode = value; }
        }
        private string commodityName;
        public virtual string CommodityName
        {
            get { return commodityName ?? (Commodity == null ? string.Empty : Commodity.Name); ; }
            set { commodityName = value; }
        }
        [JsonProperty("commodity_price")]
        public virtual Decimal CommodityPrice { get; set; }
        [JsonProperty("commodity_quantity")]
        public virtual int CommodityQuantity { get; set; }
    }
}
